/*
 * @Description: 动态路由
 */

import { RouteRecordRaw } from 'vue-router'

const LAYOUT = () => import('@/layouts/index.vue')

export const dynamicRoutes: Array<RouteRecordRaw> = [
  {
    name: 'Home',
    path: '/home',
    component: LAYOUT,
    redirect: '/home/user',
    meta: {
      title: '工作区',
      icon: 'Lock',
    },
    children: [
      {
        name: 'User',
        path: '/home/user',     
        component: () => import('@/views/wordarea/index.vue'),
        meta: {
          title: '首页数据',
          icon: 'HomeFilled',
        },
      } 
    ],
  },
  {
    name: 'Order',
    path: '/order',
    component: LAYOUT,
    redirect: '/order/list',
    meta: {
      title: '订单管理',
      icon: 'ShoppingTrolley',
    },
    children: [
      {
        name: 'OrderList',
        path: '/order/list',
        component: () => import('@/views/order/list/index.vue'),
        meta: {
          title: '订单列表',
          icon: 'List',
        },
      },
      
    ],
  },


    // 商品管理
  {
    name: 'Product',
    path: '/product',
    component: LAYOUT,
    redirect: '/product/attr',
    meta: {
      title: '商品管理',
      icon: 'Goods',
    },
    children: [
      {
        name: 'product-list',
        path: '/product/list',
        component: () => import('@/views/product/index.vue'),
        meta: {
          title: '商品列表',
          icon: 'Collection',
        },
      },
  
    ],
  },
  {
    name: 'Donyin',
    path: '/donyin',
    component: LAYOUT,
    redirect: '/donyin/list',
    meta: {
      title: '抖音管理',
      icon: 'Goods',
    },
    children: [
      {
        name: 'donyin-list',
        path: '/douyin/list',
        component: () => import('@/views/douyin/index.vue'),
        meta: {
          title: '抖音列表',
          icon: 'Calendar',
        },
      },
  
    ],
  },
  {
    name: 'Setting',
    path: '/setting',
    component: LAYOUT,
    redirect: '/setting/index',
    meta: {
      title: '系统设置',
      icon: 'Goods',
    },
    children: [
      {
        name: 'setting-index',
        path: '/setting/index',
        component: () => import('@/views/setting/index.vue'),
        meta: {
          title: '系统设置',
          icon: 'Setting',
        },
      },
  
    ],
  },

]